package com.cssl.config;

import com.cssl.domain.ZFB;
import com.cssl.util.AlipayPayment;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AlipayConfig {
    @Bean
    // 确保只会有一个Bean
    public AlipayPayment alipayPayment(ZFB zfb) {
        System.out.println("aliOssProperties = " + zfb);
        return new AlipayPayment(zfb.getAppId(), zfb.getAppPrivateKey(),zfb.getCharSet(),zfb.getAlipayPublicKey(),zfb.getGateWayUrl()
        ,zfb.getFormat(),zfb.getSignType(),zfb.getNotifyUrl(),zfb.getReturnUrl() );
    }
}
